package com.traffic.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.traffic.mapper.PerSealDocumentMapper;
import com.traffic.domain.PerSealDocument;
import com.traffic.service.IPerSealDocumentService;

/**
 * 电子签章Service业务层处理
 * 
 * @author 郭世纪
 * @date 2024-12-08
 */
@Service
public class PerSealDocumentServiceImpl implements IPerSealDocumentService 
{
    @Autowired
    private PerSealDocumentMapper perSealDocumentMapper;

    /**
     * 查询电子签章
     * 
     * @param applicationId 电子签章主键
     * @return 电子签章
     */
    @Override
    public PerSealDocument selectPerSealDocumentByApplicationId(Long applicationId)
    {
        return perSealDocumentMapper.selectPerSealDocumentByApplicationId(applicationId);
    }

    /**
     * 查询电子签章列表
     * 
     * @param perSealDocument 电子签章
     * @return 电子签章
     */
    @Override
    public List<PerSealDocument> selectPerSealDocumentList(PerSealDocument perSealDocument)
    {
        return perSealDocumentMapper.selectPerSealDocumentList(perSealDocument);
    }

    /**
     * 新增电子签章
     * 
     * @param perSealDocument 电子签章
     * @return 结果
     */
    @Override
    public int insertPerSealDocument(PerSealDocument perSealDocument)
    {
        return perSealDocumentMapper.insertPerSealDocument(perSealDocument);
    }

    /**
     * 修改电子签章
     * 
     * @param perSealDocument 电子签章
     * @return 结果
     */
    @Override
    public int updatePerSealDocument(PerSealDocument perSealDocument)
    {
        perSealDocument.setUpdateTime(DateUtils.getNowDate());
        return perSealDocumentMapper.updatePerSealDocument(perSealDocument);
    }

    /**
     * 批量删除电子签章
     * 
     * @param applicationIds 需要删除的电子签章主键
     * @return 结果
     */
    @Override
    public int deletePerSealDocumentByApplicationIds(Long[] applicationIds)
    {
        return perSealDocumentMapper.deletePerSealDocumentByApplicationIds(applicationIds);
    }

    /**
     * 删除电子签章信息
     * 
     * @param applicationId 电子签章主键
     * @return 结果
     */
    @Override
    public int deletePerSealDocumentByApplicationId(Long applicationId)
    {
        return perSealDocumentMapper.deletePerSealDocumentByApplicationId(applicationId);
    }
}
